package tbalert.web.dao.impl;

import org.hibernate.HibernateException;

import tbalert.hibernate3.HibernateBaseDao;
import tbalert.web.dao.YmjgDao;
import tbalert.web.entity.Ymjg;

public class YmjgDaoImpl extends HibernateBaseDao<Ymjg, String> implements YmjgDao {

	public Ymjg deleteById(String kicid) {
		Ymjg entity = super.get(kicid);
		if (entity != null) {
			getSession().delete(entity);
		}
		return entity;
	}

	@Override
	public Ymjg findByKicid(String kicid) {
		return get(kicid);
	}

	@Override
	public Ymjg save(Ymjg bean) throws HibernateException {
		getSession().save(bean);
		return bean;
	}

	@Override
	protected Class<Ymjg> getEntityClass() {
		return Ymjg.class;
	}
}
